package org.spdata.tsdb.client;

import java.util.Map;

/**
 * 子查询条件
 */
public class SubQuery {
	/**
	 * 需要查询的测点
	 */
	private String metric;
	/**
	 * 测点的标签Query
	 */
	private Map<String,String> tags = null;
	
	public static SubQuery newInstance(){
		return new SubQuery();
	}
	
	public String getMetric() {
		return metric;
	}
	
	public SubQuery setMetric(String metric) {
		this.metric = metric;
		return this;
	}
	
	
	public Map<String, String> getTags() {
		return tags;
	}
	
	public void setTags(Map<String, String> tags) {
		this.tags = tags;
	}
	
	public SubQuery addTag(String name,String value) {
		this.tags.put(name, value);
		return this;
	}
	
}
